home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
cprog.EXE
/
CC_1.ZIP
/
PRINTF.C
< prev
next >
Wrap
Text File
|
1990-11-20
|
496b
|
17 lines
/*
** printf(format [,arg] ... ) -- formatted print
** operates as described by Kernighan & Ritchie
** only d, o, x, c, s, and u specs are supported.
*/
extern int *stdout, CCARGC(), _format(), fputc();
printf(args) int args; {
int argc, *argv, *ctl;
argc = CCARGC() - 1; /* fetch arg count from CX reg */
argv = &args; /* address of first argument */
ctl = argv[argc]; /* get address of format string */
_format(ctl, argc, argv, fputc, stdout);
}